#ifndef __YHM_SERVER_H__
#define __YHM_SERVER_H__

#include "types.h"
#include "tools.h"
#include <malloc.h>
#include <infiniband/verbs.h>

#include "../shared.h"

#define POLL_NUM 16

struct recv_ring32{
  struct m32 *mem;
  int num;
  int head, tail;
  unsigned lkey;
  struct ibv_mr *mr;
};

void *user_routine(void *);
void *server_poll_routine(void *);
void *client_poll_routine(void *);
void main_control(struct server_ctx *ctx);
void init_server_struct(struct server_ctx *ctx);

#endif